/**
 * 工作单位：IT创新工作室
 * 文件名：ToggleController
 * 作者：cheru
 * 日期：2019/11/29 16:08
 */
package com.itgzs.front.controller;

import com.itgzs.front.bean.Sensor;
import com.itgzs.front.bean.Toggle;
import com.itgzs.front.service.ToggleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ToggleController {

    @Autowired
    private ToggleService toggleService;

    @GetMapping("/toggle")
    public String updateToggle(Toggle toggle){

        toggleService.updateToggle(toggle);
        System.out.println(toggle);

        return "success";
    }
}
